<?php
/**
 * Main_Model_Acl_Storefront
 *
 * @category   Main
 * @package    Main_Model_Acl
 * @copyright  Copyright (c) 2011 Ankur Pandey
 */
class Main_Model_Acl_Main extends Zend_Acl implements WOW_Acl_Interface
{
    /**
     * Add the roles to the acl and deny all by default
     */
    public function __construct()
    {
        // Define roles:
        $this->addRole(new Main_Model_Acl_Role_Normal)
             ->addRole(new Main_Model_Acl_Role_Moderator, 'Normal')
             ->addRole(new Main_Model_Acl_Role_Admin, 'Moderator');

        // Deny privileges by default; i.e., create a whitelist
        $this->deny();

        // Add permission for non Model access restrictions
        $this->add(new Main_Model_Acl_Resource_Admin)->allow('Admin');
    }
}